const path = require('path')
var Dashboard = require('webpack-dashboard')
// import the plugin
var DashboardPlugin = require('webpack-dashboard/plugin')

var dashboard = new Dashboard()

module.exports = {
  entry: [
    'webpack-dev-server/client?http://0.0.0.0:8080',
    'babel-polyfill',
    './app.js',
  ],
  output: {
    path: 'dist',
    filename: 'bundle.js'
  },
  resolve: {
    extensions: ['', '.coffee', '.js', '.jsx'],
    alias: {
      appRoot: path.join(__dirname, 'src'),
    }

  },
  plugins: [
    new DashboardPlugin(dashboard.setData)
  ],
  module: {
    loaders: [
      {
        test: /\.jsx?/,
        exclude: /node_modules/,
        loader: 'babel-loader',
      }
    ]
  },
}